﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UserControl/UI/MainSite.Master" AutoEventWireup="true" CodeBehind="OutOfSetList.aspx.cs" Inherits="UI.Module.OutOfSet.OutOfSetList" %>

<%@ Register Src="../../UserControl/UI/Pager.ascx" TagName="Pager" TagPrefix="mereg" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style>
        .pagination, .pagination ul {
            height: auto;
            overflow: hidden;
        }

            .pagination ul li {
                height: 30px;
                line-height: 30px;
                float: left;
                margin: 0 10px 0 0;
            }
             .tdaligncenter { text-align:center;}
        .tdalignright {text-align:right;}
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <form id="form1" runat="server">
        <asp:HiddenField ID="HiddenField1" runat="server" />
    <script type="text/javascript">

        $(function () {

            //StatSum("lblAAcount", "spAAcount");  

            StatSum("txtV", "sptxtV");

        })

        function StatSum(lblId, spId) {
            var sum = 0;

            $("span[class='" + lblId + "']").each(function () {

                sum += parseFloat($(this).text());

            });
            $("span[class='" + spId + "']").each(function () {
                $(this).text(sum);
            });

        }

    </script>
    <h2 class="mbx">年度收益与违规 &gt; 详情</h2>
    <div class="morebt">
        <ul id="shopList" runat="server">
        </ul>
    </div>
    <div class="cztable">
        <div>
            <h2 class="mbx">年月度收益情况信息</h2>
            <asp:Repeater ID="rptTest" runat="server">
                <HeaderTemplate>
                    <table style="width: 100%; text-align: center;">
                        <tr>
                            <th>月度</th>
                            <th>收益(元)</th>
                        </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr>
                        <td>
                            <asp:Label runat="server" ID="lblAAcount" Text='<%#Eval("StatMonth")%>'></asp:Label></td>
                        <td>
                            <asp:Label runat="server" ID="lblBBcount" CssClass="txtV" Text='<%#Eval("InCome")%>'></asp:Label></td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                    <%-- <tr>
                        <td colspan="2">
                            <asp:Label ID="lbEmpty" Text="找不到任何数据！" ForeColor="Red"  runat="server" Visible='<%#bool.Parse((rptTest.Items.Count==0).ToString())%>'></asp:Label> 
                        </td>
                    </tr>--%>
                    <tr>
                        <td>合计</td>
                        <td><span id="spBBcount" class="sptxtV"></span></td>
                    </tr>
                    </table>  
                </FooterTemplate>
            </asp:Repeater>
            <mereg:Pager runat="server" ID="Pager" OnBindData="Pager_BindData" />
        </div>
        <div>
            <h2 class="mbx">违规项目信息</h2>
            <asp:GridView ID="GridView1" Width="100%" runat="server" CssClass="table table-bordered table-striped with-check" EnableViewState="false" EmptyDataText="未找到相关数据" EmptyDataRowStyle-HorizontalAlign="Center" OnRowDataBound="GridView1_RowDataBound" AutoGenerateColumns="false">
                <Columns>
                    <asp:BoundField HeaderText="序号" ItemStyle-Width="30" />
                    <asp:BoundField HeaderText="门店名称" DataField="shopName" />
                    <asp:BoundField HeaderText="违规时间" DataField="LogTime" ItemStyle-CssClass="tdaligncenter"/>
                    <asp:BoundField HeaderText="违规事项" DataField="OutOfItem" />
                    <asp:BoundField HeaderText="扣除保证金金额(元)" DataField="CutMoney" ItemStyle-CssClass="tdalignright" ItemStyle-Width="110px" />
                    <%--<asp:BoundField HeaderText="处理措施" DataField="Solve" />
                    <asp:BoundField HeaderText="情况说明" DataField="Note" />--%>
                    <asp:BoundField HeaderText="创建时间" DataField="CreateTime" ItemStyle-CssClass="tdaligncenter"/>
                    <asp:TemplateField HeaderText="操作" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Center">
                        <ItemTemplate>
                            <a href="OutOfSetDetail.aspx?ID=<%#Eval("ID") %>">查看详细</a>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            <mereg:Pager runat="server" ID="Pager1" OnBindData="Pager1_BindData" />
        </div>
        <div>
            <h2 class="mbx">销售额梯级信息</h2>
            <asp:GridView ID="GridView2" Width="100%"  style="text-align:center" runat="server" CssClass="table table-bordered table-striped with-check" EnableViewState="false" EmptyDataText="未找到相关数据" EmptyDataRowStyle-HorizontalAlign="Center" OnRowDataBound="GridView2_RowDataBound" AutoGenerateColumns="false">
                <Columns>
                     <asp:BoundField HeaderText="序号" ItemStyle-Width="30" />
                    <asp:BoundField HeaderText="年销售总额(元)" DataField="SaleMoney"  />
                    <asp:BoundField HeaderText="收益梯级百分比" DataField="Rate" />
                </Columns>
            </asp:GridView>
            <mereg:Pager runat="server" ID="Pager2" OnBindData="Pager2_BindData" />
        </div>

        <div id="div_sy" runat="server" style="display:none">
            <p>年度总收益（元）	═	实际产生收益（元）	┼	补偿收益（元）</p>
            
            <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>元=
            <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>元+
            <asp:Label ID="Label3" runat="server" Text="Label"></asp:Label>元
            <asp:Button ID="Button1" runat="server" Text="申请补偿" OnClick="Button1_Click" />
        </div>
    </div>
    </form>
</asp:Content>
